Skip to content

Expose disabled HK strategy profiles - #121

Merged
Pigbibi merged 6 commits into
mainfrom
codex/hk-equity-strategy-integration
May 31, 2026
Merged

Expose disabled HK strategy profiles#121
Pigbibi merged 6 commits into
mainfrom
codex/hk-equity-strategy-integration

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expose HK market-history profiles as eligible but disabled in IBKR runtime matrix
  • add disabled hk_listed_global_etf_rotation after the HK strategy package added the research candidate
  • update HK runtime docs and pin HkEquityStrategies to the new commit

Safety

  • HK profiles are not in enabled/supported runtime profiles
  • production STRATEGY_PROFILE remains rejected for HK research candidates
  • no Cloud Run env, secrets, gateway, or deployment config changed

Validation

  • PYTHONPATH=/Users/lisiyi/Projects/HkEquityStrategies/src:/tmp/qsl-hk-test-venv/lib/python3.12/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src /tmp/qsl-hk-test-venv/bin/python -m pytest tests/test_runtime_config_support.py -q -k 'not print_strategy_profile_status_json and not print_strategy_switch_env_plan and not build_cloud_run_env_sync_plan' -> 52 passed, 12 deselected
  • bash tests/test_sync_cloud_run_env_workflow.sh
  • PYTHONPATH=/Users/lisiyi/Projects/HkEquityStrategies/src:/tmp/qsl-hk-test-venv/lib/python3.12/site-packages:/Users/lisiyi/Projects/QuantPlatformKit/src /tmp/qsl-hk-test-venv/bin/python -m compileall -q . && git diff --check

Known local limitation: full subprocess-based strategy status/env-sync tests are affected by sibling UsEquityStrategies/src path precedence on this machine; the targeted non-subprocess/runtime checks above passed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3fd65d7b9d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread main.py
Comment on lines +785 to +789
if not is_market_open_today(
calendar_name=MARKET_CALENDAR,
timezone_name=MARKET_TIMEZONE,
logger=lambda message: print(message, flush=True),
):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve zero-arg market-open test doubles

With this call now always passing keyword arguments, the existing request-handling tests that monkeypatch main.is_market_open_today with zero-argument lambdas (for example in tests/test_request_handling.py) will raise TypeError before they reach the assertions. Either update those test doubles to accept **kwargs or wrap the call so the suite can still exercise the handler paths.

Useful? React with 👍 / 👎.

@Pigbibi
Pigbibi merged commit 3f7b6b7 into main May 31, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 52c280c919

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
)
continue
positions.append(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Filter positions to the configured market currency

When a selected account also holds a position whose contract.currency differs from MARKET_CURRENCY (for example USD AAPL in an HKD account), this still adds it to the portfolio snapshot. get_current_portfolio then feeds every snapshot position into rebalancing, while the new quote/order wrappers force all contracts to the configured MARKET_EXCHANGE/MARKET_CURRENCY, so the runner can try to quote or submit an invalid HKD/SEHK order for a USD symbol. Since account values are already filtered by market_currency, skip or separately quarantine non-market-currency positions here.

Useful? React with 👍 / 👎.

@Pigbibi
Pigbibi deleted the codex/hk-equity-strategy-integration branch May 31, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant